using System.Threading.Tasks;
using ePipe;

namespace Letter.IO;

static class PipeWriterExtension
{
    public static async ValueTask<bool> FlushAsync1<T>(this IPipeWriter<T> PipeWriter)
    {
        var result = await PipeWriter.FlushAsync();
        return !(result.IsCompleted || result.IsCanceled);
    }
}